Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(local-dev): fix backups in local dev #5063

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

JGAntunes
Copy link
Member

What this PR does / why we need it:

Fixes a problem when running kotsadm local dev and trying to run a backup:

Internal error occurred: error executing command in container: failed to exec in container: failed to start exec "9347c66fde301c9e41825b6ea3e47d17610a308deaae3649179a9a0a721bcdec": OCI runtime exec failed: exec failed: unable to start container process: exec: "/backup.sh": stat /backup.sh: no such file or directory: unknown

This happens because we're missing all the script assets listed here:

  • COPY --chown=kotsadm:kotsadm ./deploy/assets/backup.sh /backup.sh
    COPY --chown=kotsadm:kotsadm ./deploy/assets/restore-db.sh /restore-db.sh
    COPY --chown=kotsadm:kotsadm ./deploy/assets/restore-s3.sh /restore-s3.sh
    COPY --chown=kotsadm:kotsadm ./deploy/assets/restore.sh /restore.sh
    COPY --chown=kotsadm:kotsadm ./deploy/assets/migrate-s3.sh /migrate-s3.sh
    COPY --chown=kotsadm:kotsadm ./deploy/assets/fs-minio-check.sh /fs-minio-check.sh
    COPY --chown=kotsadm:kotsadm ./deploy/assets/fs-minio-reset.sh /fs-minio-reset.sh
    COPY --chown=kotsadm:kotsadm ./deploy/assets/fs-minio-keys-sha.sh /fs-minio-keys-sha.sh
    COPY --chown=kotsadm:kotsadm ./deploy/assets/s3-bucket-create.sh /s3-bucket-create.sh
    COPY --chown=kotsadm:kotsadm ./deploy/assets/s3-bucket-head.sh /s3-bucket-head.sh
    COPY --chown=kotsadm:kotsadm ./deploy/assets/kots-upgrade.sh /kots-upgrade.sh

Which issue(s) this PR fixes:

NA

Does this PR require a test?

NONE

Does this PR require a release note?

NONE

Does this PR require documentation?

NONE

@JGAntunes JGAntunes self-assigned this Dec 19, 2024
@JGAntunes JGAntunes requested a review from sgalsaleh December 19, 2024 12:11
@JGAntunes JGAntunes enabled auto-merge (squash) December 19, 2024 12:13
@sgalsaleh
Copy link
Member

What about other scripts that should be included in the container? We should probably move all of these files into a /scripts directory in the container (dev & production) and then just mount it in the dev env.

Copy link

github-actions bot commented Dec 19, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants